package com.example.tutorialmongodb.jpa;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author: cph
 * @date: 2021/10/20 12:19
 */
@Data
@Document(collection = "tutorials")
public class Tutorial {

    @Id
    private String id;
    private String title;
    private String description;
    private Boolean published;

    public Tutorial(String title, String description, Boolean published) {
        this.title = title;
        this.description = description;
        this.published = published;
    }
}
